package cn.com.dbappsecurity.frame.datamodal;

import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;

import com.fasterxml.jackson.databind.ObjectMapper;

public interface IDataModal {

	public static final Logger LOG = Logger.getLogger(IDataModal.class);
	
	/**
	 * 操作JSON的主要对象
	 */
	public static final ObjectMapper MAPPER = new ObjectMapper(){
		private static final long serialVersionUID = 1L;
		{
			//设置日期类型的默认输出格式
			this.setDateFormat(new SimpleDateFormat("yyyy-MM-dd"));
		}
	};
	
	public boolean isSuccess();
	
	/**
	 * 响应数据到前台
	 * @param req
	 * @param response
	 */
	public void shipToResponse(HttpServletRequest req,HttpServletResponse response);
	
}
